<html>
<head><meta charset="utf-8"><title>ty::walk::TypeWalker depth · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/ty.3A.3Awalk.3A.3ATypeWalker.20depth.html">ty::walk::TypeWalker depth</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="186466265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/ty%3A%3Awalk%3A%3ATypeWalker%20depth/near/186466265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/ty.3A.3Awalk.3A.3ATypeWalker.20depth.html#186466265">(Jan 24 2020 at 06:11)</a>:</h4>
<p>Does <code>ty::walk::TypeWalker</code> also visit the types of struct's fields or enum variants? I'm essentially trying to find out if a type or any of the types of the fields/variants implement <code>Drop</code>.</p>



<a name="186466390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/ty%3A%3Awalk%3A%3ATypeWalker%20depth/near/186466390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/ty.3A.3Awalk.3A.3ATypeWalker.20depth.html#186466390">(Jan 24 2020 at 06:14)</a>:</h4>
<p>For reference, this is for fixing a bug in Clippy's <code>const_fn</code> lint: <a href="https://github.com/rust-lang/rust-clippy/pull/4981#issuecomment-572913738" target="_blank" title="https://github.com/rust-lang/rust-clippy/pull/4981#issuecomment-572913738">https://github.com/rust-lang/rust-clippy/pull/4981#issuecomment-572913738</a></p>



<a name="186545830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/ty%3A%3Awalk%3A%3ATypeWalker%20depth/near/186545830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/ty.3A.3Awalk.3A.3ATypeWalker.20depth.html#186545830">(Jan 24 2020 at 23:47)</a>:</h4>
<p><code>ty.needs_drop</code> already does this.</p>



<a name="186562708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/ty%3A%3Awalk%3A%3ATypeWalker%20depth/near/186562708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/ty.3A.3Awalk.3A.3ATypeWalker.20depth.html#186562708">(Jan 25 2020 at 07:54)</a>:</h4>
<p>thanks! somehow I missed that method and it seems to work <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>